package com.sacc.controller;


import com.sacc.clients.OrderClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 滚~韬
 * @date 2022/4/7 18:20
 */
@RestController
@RequestMapping("/user/myorder")
public class MyOrderController {
    @Autowired
    private OrderClient orderClient;

    /**
     * 获取待支付的名单
     * @param openId
     * @return
     */
    @GetMapping("/pay/get")
    public String GetOrderWaitPay(@RequestParam String openId){
        return orderClient.GetOrderWaitPay(openId);
    }
    /**
     * 添加待支付的名单
     * @param openId
     * @return
     */
    @GetMapping("/pay/add")
    public String AddOrderWaitPay(@RequestParam String openId){
        return orderClient.GetOrderWaitPay(openId);
    }

    /**
     * 获取待发货的名单
     * @param openId
     * @return
     */
    @GetMapping("/send/get")
    public String GetOrderWaitSend(@RequestParam String openId){
        return orderClient.GetOrderWaitSend(openId);
    }

    /**
     *  获取待收货的订单
     * @param openId
     * @return
     */
    @GetMapping("/get/get")
    public String GetOrderWaitGet(@RequestParam String openId){
        return orderClient.GetOrderWaitGet(openId);
    }
}
